import { fromJS, Record } from "immutable";

const TodoProto = {
  id: 0,
  text: '',
  completed: false
}

export class Todo extends Record(TodoProto) {
  id: number
  text: string
  completed?: boolean

  constructor(props) {
    super(props)
  }
}


export const TODOS = fromJS([
  new Todo({ id: 1, text: 'Todo 1' }),
  new Todo({ id: 2, text: 'Todo 2' }),
  new Todo({ id: 3, text: 'Todo 3' })
])
